package com.cc.Test;

public class kk {
    //名字属性
    private String name;
    //等级
    private int level;
    //攻击力
    private int atk;
    //血重
    private int hp;

    public void attack(pp hero) {
        System.out.println("攻击力" + atk + "的黄雄" + name + "攻击了" + hero.getName());
//实现对方英雄扣血敌方，血量”敌方.血量-我方，攻击力
        hero.setHp(hero.getHp() - this.getAtk());
        System.out.println("敌方血量"+hero.getName()+"剩余血量"+hero.getHp());
    }
//回城
        public void back(){
            System.out.println("英雄"+name +"回城了");
        }
                public kk(String name, int level, int atk, int hp){
            this.name = name;
            this.level = level;
            this.atk = atk;
            this.hp = hp;
        }
                    public kk() {
            }
        }

